<nav class="navbar navbar-default">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
            aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="/static" class="navbar-brand">学习笔记</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li><a href="/static">主页</a></li>
                <li><a href="/articles">笔记</a></li>
                <li><a href="/about">关于</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                {% if session.logged_in %}
                <li><a href="/dashboard">控制台</a></li>
                <li><a href="/layout">退出</a></li>
                {% else %}
                <li><a href="/register">注册</a></li>
                <li><a href="/login">登录</a></li>
                {% endif %}
            </ul>
        </div>
    </div>
</nav>